/*
1.在下面类的基础上扩展新类CheckingAccount对每次存款和取款都收取1美元
2.扩展一个练习的BankAccount类，新类SavingAccount每个月都会有利息产生
（earnMonthlyInterest方法被调用），并且有每月3次免手续费的存款或取款。再earnMonthlyInterest
方法中重置交易次数
 */
public class BankAccount {
    private double balance;//余额
    public BankAccount(double balance) {
        this.balance =  balance;
    }
    //amount-存款或取款的钱
    public void deposit(double amount) {
        this.balance += amount;
    }
    public void withdraw(double amount) {
        this.balance -= amount;
    }
    public double getBalance() {
        return balance;
    }
    public void setBalance(double balance) {
        this.balance = balance;
    }
    public void print() {
        System.out.println(balance);
    }
}
